# $Id: PKGBUILD 183401 2013-04-21 22:10:28Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-sudoku
pkgver=3.8.1
pkgrel=1
pkgdesc="Test your logic skills in this number grid puzzle"
arch=('any')
license=('GPL')
depends=('desktop-file-utils' 'hicolor-icon-theme' 'python2-gobject' 'dconf')
makedepends=('intltool' 'itstool')
conflicts=('gnome-games')
replaces=('gnome-games')
options=('!emptydirs' '!libtool')
install=gnome-sudoku.install
url="https://live.gnome.org/GnomeSudoku"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz
        0001-Fix-NumberBox-envents-configuration-with-latest-pygo.patch)
sha256sums=('7bb60a4f30bee80abdef131aa221df7b60208f99d66c4f19425e21c51e8fdecc'
            'd673f6cf3de9438a5790212493c2980128986ab1b7743cbf4b4ac40cffe8a5e5')

build() {
  cd $pkgname-$pkgver
  patch -p1 -i ../0001-Fix-NumberBox-envents-configuration-with-latest-pygo.patch
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-schemas-compile
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  sed -i 's_#! /usr/bin/env python_#!/usr/bin/env python2_' "$pkgdir/usr/bin/gnome-sudoku"
}
